package com.example.club_mvvm.http_hilt.api

import okhttp3.Interceptor
import okhttp3.Response

/**
 * @author yaotianxue
 * @description 自定义请求头拦截器
 * @date 2025/1/13
 */
class HttpHeaderInterceptor:Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
//        Content-Language: zh_CN
//        platform: ANDROID
//        source: CLUB_APP
//        Authorization:
//        meid: ai0d75be6be8db1f85ef1768a0157815ed
//        version: 1.1.5
//        phoneModel: google_sdk_gphone64_x86_64
       val newRequest = chain.request().newBuilder()
            .addHeader("Content-Language","zh_CN")
            .addHeader("platform","ANDROID")
            .addHeader("source","CLUB_APP")
            .addHeader("Authorization","")//token
            .addHeader("meid","ai0d75be6be8db1f85ef1768a0157815ed")
            .addHeader("version","1.1.5")
            .addHeader("phoneModel","google_sdk_gphone64_x86_64")
            .build()
        return chain.proceed(newRequest)
    }
}